<?php 

 namespace app\article\validate;
 use think\Validate;

 class Admiration extends Validate
 {
    /**
     * 规则
     * @var [type]
     */
    protected $rule = [
        'article_id|文章信息' => 'require|integer',
        'username|用户名' => 'require',
        'avatar|用户头像' => 'require',
        'status|点赞状态' => 'require|in:0,1',
    ];

    /**
     * 验证场景
     * @var [type]
     */
    protected $scene =[
        'create' => ['article_id','username','avatar'],
        'edit' => ['article_id','username','avatar','status'],
    ];

 }